{% load umap_tags i18n %}

{% for map_inst in maps %}
  <div class="card">
    {% map_fragment map_inst prefix=prefix page=request.GET.p %}
    <hgroup>
      <div>
        {% if map_inst.tags %}
          <ul class="tag-list">
            {% for tag, label in map_inst.get_tags_display %}
              <li><a href="{% url 'search' %}?tags={{ tag }}">{{ label }}</a></li>
            {% endfor %}
          </ul>
        {% endif %}
        <h3>{% if map_inst.is_template %}<mark class="template-map">[{% trans "template" %}]</mark>{% endif %} {{ map_inst.name }}</h3>
        {% with author=map_inst.get_author %}
          {% if author %}
            <p>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></p>
          {% endif %}
        {% endwith %}
      </div>
      <a class="main" href="{{ map_inst.get_absolute_url }}">{% if map_inst.is_template %}{% translate "See the template" %}{% else %}{% translate "See the map" %}{% endif %}</a>
    </hgroup>
  </div>
{% endfor %}
{% if maps.has_next %}
  <a href="?{% paginate_querystring maps.next_page_number %}"
     class="button more_button neutral">{% trans "More" %}</a>
{% endif %}
